using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class HotButton : MonoBehaviour
{
    Button btn;
    public KeyCode key;
    void Start()
    {
        btn = this.GetComponent<Button>();
    }
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(key))
        {
            if(btn.interactable)
                btn.onClick.Invoke();
        }
    }
}
